package com.coflxl.common.model;

import lombok.Getter;

public enum  ResultCode {

    SUCCESS(200, "成功"),
    FAILURE(201, "失败"),
    PARAM_ERROR(400, "参数错误"),
    NOT_PERMISSION(402, "未授权，无法访问"),
    WRONG_PASSWORD(403, "用户名或密码错误"),
    NOT_FOUND(404, "文件不存在或已被删除"),
    METHOD_NOT_SUPPORT(405, "方法不被允许"),
    SERVER_ERROR(500, "服务器异常，请联系管理员");

    @Getter
    private Integer code;
    @Getter
    private String message;

    ResultCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer code(){
        return this.code;
    }

    public String message(){
        return this.message;
    }
}
